package com.songcha.module_home.api


import com.songcha.library_business.bean.book.BookListBean
import com.songcha.library_business.bean.book.BookNetBean
import com.songcha.library_network.bean.BaseListDataBean
import com.songcha.module_home.bean.HomeCateBean
import com.songcha.module_home.bean.SearchListDataBean
import io.reactivex.Observable
import retrofit2.http.GET
import retrofit2.http.Path

interface HomeApiService {

    @GET("/api/getCategoryCustom")
    fun getHomeCate():Observable<HomeCateBean>

    @GET("/api/searchBookByCategoryCustomId/{categoryCustomId}/{current}/10")
    fun getHomeCateBookList(@Path("categoryCustomId") categoryCustomId:Int,@Path("current") currentPage:Int):Observable<BookListBean>

    @GET("/api/searchBook/{keyword}")
    fun searchBook(@Path("keyword") keyword:String):Observable<SearchListDataBean>

    @GET("/api/getRecommendBook/{current}/{pageSize}")
    fun getEditorRecommendBookList(@Path("current") current:Int,@Path("pageSize") pageSize:Int):Observable<BookListBean>

    @GET("/api/getNewestBook/{current}/{pageSize}")
    fun getNewBookShelveList(@Path("current") current:Int,@Path("pageSize") pageSize:Int):Observable<BookListBean>

    @GET("/api/getHeatBook/{current}/10")
    fun getHostBookList(@Path("current") current:Int):Observable<BookListBean>

    @GET("/api/getRecommendBookDb")
    fun getHomeRecommendDialogBookList():Observable<BaseListDataBean<BookNetBean>>
}